home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / dirut / secret3.zip / RDSECRE2.ASM < prev    next >
Assembly Source File  |  1992-10-17  |  1KB  |  61 lines

  1. TITLE    RDSECRET    5-9-85    [10-17-92]
  2. ;v1.1    Toad Hall Rewrite of a disassembly of RDSECRET.COM
  3. ;    Severe tightening: a virtual rewrite.
  4. ;    Released to the public domain.
  5. ;
  6. ;v1.2    Added cmdline processing as well as prompted entry
  7. ;    in common GETPARM.INC.
  8. ;
  9. ;    David Kirschbaum
  10. ;    Toad Hall
  11.  
  12. LF    EQU    0AH
  13. CR    EQU    0DH
  14.  
  15. CSEG    SEGMENT
  16.     ASSUME DS:CSEG, SS:CSEG ,CS:CSEG ,ES:CSEG
  17.     ORG    100H
  18.  
  19. RDSecret    PROC    NEAR
  20.  
  21.     jmp    Start            ;v1.2
  22.  
  23. logo    label    byte
  24. db    'RDSECRET: Removes "secret" directory created by MDSECRET.',CR,LF
  25. db    'Usage:  RDSECRET [dirnam]',CR,LF
  26. db    'Where [dirname] is a legal directory name (up to 7 chars max).',CR,LF
  27. db    'v1.2 Public domain rewrite of an old 1985 standard.',CR,LF
  28. db    'David Kirschbaum, Toad Hall',CR,LF,'$'
  29.  
  30. Start:    call    GetParm            ;get directory name        v1.2
  31.     jc    MsgTerm            ;no or illegal input, fail    v1.2
  32.                     ;(msg in DX, AL=-1)
  33.  
  34. ;DS:DX -> directory name start, CX = name length.
  35.  
  36.     MOV    AH,3AH            ;delete subdirectory
  37.     INT    21H
  38.     jnb    Term            ;deleted ok, terminate        v1.1
  39.  
  40. ;Remove failed.  Report.
  41.  
  42.     add    error1F9,al        ;error msg digit        v1.1
  43.     MOV    DX,OFFSET msg1F0    ;'Error # x'
  44.  
  45. ;v1.1 Display message in DX, terminate with ERRORLEVEL in AL
  46.  
  47. MsgTerm:
  48.     push    ax            ;save errorlevel        v1.1
  49.     MOV    AH,9            ;display msg in DX
  50.     INT    21H
  51.     pop    ax            ;restore errorlevel        v1.1
  52. Term:    mov    ah,4CH            ;terminate, ERRORLEVEL in AL    v1.1
  53.     int    21H            ;v1.1
  54.  
  55. RDSecret    ENDP
  56.  
  57. INCLUDE    GETPARM.INC            ;v1.2
  58.  
  59. CSEG    ENDS
  60.     END    RDSecret
  61.